import { request } from "@/network/request";
import axios from "axios";

export function find() {
  return request({
    baseURL: "/apiproduct",
    method: "GET", // 发送方法 GET POST DELETE PUT
    url: "/product/product/getAllProducts", // url地址后缀完整的在外部

    headers: {
      // 头文件封装
      Authorization: sessionStorage.getItem("userToken"),
      // 格式设置
      "Content-Type": "application/json"
    }
  });
}
export function findStudent() {
  return request({
    baseURL: "/msglen",
    method: "GET", // 发送方法 GET POST DELETE PUT
    url: "/donation/base/getallstudent", // url地址后缀完整的在外部

    headers: {
      // 头文件封装
      Authorization: sessionStorage.getItem("userToken"),
      // 格式设置
      "Content-Type": "application/json"
    }
  });
}
export function donation() {
  return request({
    baseURL: "/msglen",
    method: "GET", // 发送方法 GET POST DELETE PUT
    url: "/donation/donationthings/list", // url地址后缀完整的在外部

    headers: {
      // 头文件封装
      Authorization: sessionStorage.getItem("userToken"),
      // 格式设置
      "Content-Type": "application/json"
    }
  });
}
export function getnickname(name) {
  return request({
    baseURL: "/api",
    method: "POST", // 发送方法 GET POST DELETE PUT
    url: "/sys/test/user/getnickname", // url地址后缀完整的在外部
    params: {
      name: name
    },
    headers: {
      // 头文件封装
      Authorization: sessionStorage.getItem("userToken"),
      // 格式设置
      "Content-Type": "application/json"
    }
  });
}
export function getPic() {
  return request({
    baseURL: "/api",
    method: "GET", // 发送方法 GET POST DELETE PUT
    url: "/sys/user/lr/query", // url地址后缀完整的在外部

    headers: {
      // 头文件封装
      Authorization: sessionStorage.getItem("userToken"),
      // 格式设置
      "Content-Type": "application/json",
      token: sessionStorage.getItem("userToken")
    }
  });
}
export function findType() {
  return request({
    baseURL: "/apiproduct",
    method: "GET", // 发送方法 GET POST DELETE PUT
    url: "/product/productCategory/getAllCategory", // url地址后缀完整的在外部

    headers: {
      // 头文件封装
      Authorization: sessionStorage.getItem("userToken"),
      // 格式设置
      "Content-Type": "application/json"
    }
  });
}
